1. Field of the Invention
The present invention relates to image processing and, more particularly, to a technique of performing coordinate conversion processing in image transformation with high precision.
2. Description of the Related Art
When a front projection type projector diagonally projects a video toward a projection plane (a screen or the like), a rectangular video is projected as a transformed quadrilateral (a trapezoid or the like). To project a rectangular video as a rectangle, image transformation processing called keystone correction is used (for example, Japanese Patent Laid-Open No. 2005-33271). More specifically, a projective transformation (coordinate conversion) matrix is determined based on the shape (in general, a rectangular shape) of an input image and the shape of a projected image. Coordinates in the input image corresponding to the coordinate values of a given pixel of an output image are calculated by inverse conversion of coordinate conversion. Based on pixel values at the calculated coordinates in the input image, pixel values in the output image are calculated by interpolation calculation. For example, the pixel values of the pixel of the output image are determined by reading out the pixel values of adjacent pixels using the integer parts of the pixel values at the calculated coordinates in the input image, and weighting them based on the fraction parts of the pixel values at the calculated coordinates in the input image. This processing is executed for all the pixels of the output image, thereby storing the obtained values in an output image memory. It is possible to obtain a preferable projection result by projecting such stored output image.
In general, in projective transformation for image transformation, division is necessary besides addition/subtraction and multiplication. More specifically, it is desirable to perform coordinate conversion with high precision to correctly execute the above-described interpolation calculation. Note that to perform calculations including division, like projective transformation with high precision, a calculation with a longer bit length (for example, double precision) is necessary, resulting in an increase in implementation cost. To solve this problem, instead of executing calculation processing with a longer bit length, there is proposed a technique of restricting the transformation range and resolution so as not to increase a calculation error even with a short bit length (for example, single precision). For example, Japanese Patent Laid-Open No. 6-149993 discloses a method of performing coordinate conversion by approximate calculation of addition processing.
Since, however, the image resolution has recently improved (for example, the HD resolution (1920×1080) or 4K resolution (4096×2160)), if the approximate calculation as disclosed in Japanese Patent Laid-Open No. 6-149993 is used, it may be impossible to achieve sufficient precision. If the calculation precision in the above-described coordinate conversion (projective transformation) for image transformation is not sufficient, for example, a pixel loss or the like occurs in an output image, thereby causing a deterioration in the image quality.